﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace UnitTestForWebservers
{
   
    /// <summary>
    /// 服务端调用WebService 添加服务引用 基于SVCUtill.exe生成的
    /// 基于wsdl生成一个代理
    /// </summary>
    [TestClass]
    public class UnitTest1
    {
        static UnitTest1()
        {
            Console.WriteLine("完成静态构造函数");
        }



    [TestMethod]
        public void TestMethod1()
        {
            using (MyWebServers.WebService1SoapClient client = new MyWebServers.WebService1SoapClient())
            {
                MyWebServers.CustomSoapHeader header = new MyWebServers.CustomSoapHeader();
                String Iresult = client.GetName0(1);

            }
           
            
        }
             [TestMethod]
        public void TestMethod2()
        {
            using (MyWebServers.WebService1SoapClient client = new MyWebServers.WebService1SoapClient())
            {
                Assert.AreEqual(client.GetName(12, 45), "aaa");

            }


        }
    }
}
